package com.opennews.openplatform.familyexpenseapi.controller

import com.opennews.openplatform.familyexpenseapi.service.BankService
import com.opennews.openplatform.myspringbootcore.dto.ApiResponse
import com.opennews.openplatform.myspringbootcore.util.getSuccessResponse
import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

@RestController
@RequestMapping("/bank")
class BankController(
    private val bankService: BankService,
) {
    @GetMapping("/query-all-with-basic-info")
    fun queryAllWithBasicInfo(): ResponseEntity<ApiResponse<List<Map<String, Any>>>> {
        val result = bankService.queryAllWithBasicInfo()
        return getSuccessResponse(result)
    }
}